package cn.jsj.dispose;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 删除案件信息处理类
 * @author LI
 *
 */
 public class DeleteCaseInfo extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 调试信息
		cn.jsj.utils.SysLogger.PrintInfo("删除案件信息处理类");

		//获得案件合同号
		String contractId=request.getParameter("contractId").trim();

		//调试信息
		cn.jsj.utils.SysLogger.PrintInfo("contractID---------->"+contractId);

		//删除案件信息
		cn.jsj.dao.TblCaseInfoDAO tcid=new cn.jsj.dao.TblCaseInfoDAO();
		int deleteResult=tcid.deleteCaseInfo(contractId);

		//输出流
		java.io.PrintWriter out=response.getWriter();
		//如果删除成功
		if(deleteResult==1){
			out.println("{message:'删除成功！'}");
		}
		else{
			out.println("{message:'删除失败！'}");
		}
		out.flush();
		out.close();
	}

}